package io.wdb.modules.activity.wxapp.service;

import java.util.List;
import java.util.Map;

import io.wdb.modules.activity.wxapp.entity.HdLotteryActivityConvertInfoEntity;
import io.wdb.modules.activity.wxapp.entity.HdLotteryActivityEntity;
import io.wdb.modules.activity.wxapp.entity.HdLotteryUserInfoEntity;
import io.wdb.modules.activity.wxapp.entity.LocationCountEntity;

/**
 * 用户抽奖详情
 * 
 * @author wdb
 * @email admin@wdb007.com
 * @date 2018-04-13 16:59:02
 */
public interface HdLotteryUserInfoService {
	
	HdLotteryUserInfoEntity queryObject(String id);
	
	List<HdLotteryUserInfoEntity> queryList(Map<String, Object> map);
	
	List<HdLotteryActivityConvertInfoEntity> listFriendsLottery(Map<String, Object> map);
	
	int queryTotal(Map<String, Object> map);
	
	String save(HdLotteryUserInfoEntity hdLotteryUserInfo);
	
	void update(HdLotteryUserInfoEntity hdLotteryUserInfo);
	
	void delete(String id);
	
	void deleteBatch(String[] ids);
	/**
	 * 当天已用次数
	 * @param hdUserid
	 * @param userid
	 * @return
	 */
	public int usedLotteryCount(String hdUserid,String userid) ;
	/**
	 * 当天之前由于借阅产生的次数
	 * @param hdUserid
	 * @return
	 */
	public int usedBorrowChance(String hdUserid) ;
	/**
	 * 当天借阅是否产生次数
	 * @param hdUserid
	 * @param userid
	 * @return
	 */
	public int currentBorrowChanceCount(String hdUserid,Long userid);
	
	/**
	 * 当天分享被点击次数
	 * @param hdUserid
	 * @return
	 */
	public int parentShareLotteryCount(String hdUserid) ;
	
	public void sendLotteryAward(HdLotteryUserInfoEntity lotteryUserinfo, HdLotteryActivityEntity hdLotteryActivityEntity);
	
	 List<LocationCountEntity>  locationCountAll(String hdLotteryActivityId);
	 List<LocationCountEntity>  lotteryLocationPerMan(String hdLotteryActivityId, String hdUserId);
	 List<LocationCountEntity>  lotteryLocationPerDay(String hdLotteryActivityId);

}
